//
//  UILable+Extension.swift
//  LVWeibo
//
//  Created by lv on 15/6/30.
//  Copyright © 2015年 lv. All rights reserved.
//

import UIKit

extension UILabel {

    // 便利构造器
    convenience init(textColor: UIColor,fonSize: CGFloat = 0,layoutWidth:CGFloat,mutiLines:Bool = true) {
        self.init()
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(fonSize)
        self.preferredMaxLayoutWidth = layoutWidth
        if mutiLines {
            self.numberOfLines = 0
        }
    }
    
    convenience init(textColor: UIColor,fonSize: CGFloat = 0) {
        self.init()
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(fonSize)
    }
}